<div class="request-popup popup-wrapper">
	<div class="popup create-popup">
		<div class="head">
  			<div class="option selected" id="show-items-button">Items <span class="amount">({{sizeof($items)}})</span></div>
  			<div class="option" id="show-to-request-button">A solicitar <span class="amount">(0)</span></div>
		</div>
		<div class="filter">
			<p class="title">Filtros</p>
			<div class="reference"><input id="reference" placeholder="Referencia" name="reference" type="text"/></div>
			<div class="name"><input id="name" placeholder="Nombre" name="name" type="text"/></div>
			<div class="price-from">
				<input id="minPrice" placeholder="Precio mínimo" name="from" type="text"/>
			</div>
			<div class="price-to">
				<input id="minPrice" placeholder="Precio mínimo" name="from" type="text"/>
			</div>
			<div class="search-container"><a href="#" class="btn search">Search</a></div>
		</div>
		<div class="list">
			<div class="available-items">
				@foreach($items as $item)
					<div class="item" id="item_{{$item->pk}}">
						<div class="info">
							<div class="reference"><span class="label">Referencia: </span><span class="value">{{$item->reference}}</span></div>
							<div class="name"><span class="label">Nombre: </span><span class="value">{{$item->name}}</span></div>
							<div class="amount"><span class="label">En stock: </span><span class="value">{{$item->amount}}</span></div>
							<div class="price"><span class="label">Precio: </span><span class="value">{{$item->formattedPrice()}}</span></div>
							<div class="request-type-container">
								<span class="label">Tipo de pedido: </span>
								<select class="request-type">
								@foreach(ItemRequestType::all() as $type)
									<option value="{{$type->pk}}">{{$type->description}}</option>
								@endforeach
								</select>
							</div>
							<div class="request"><input type="text" name="amount"/><a href="#" class="btn add-request">Pedir</a></div>
						</div>
						<div class="picture">
							<img src="{{$item->image_url}}" />
						</div>
						
					</div>
				@endforeach
			</div>
		</div>
		<div class="to-request">
		</div>
		<div class="buttons">
		</div>
		<div class="options"><a href="#" class="cancel-btn">Cancelar</a></div>
		<div class="options"><a href="#" class="save-btn">Enviar</a></div>
	</div>
</div>